home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / GeoMatch.dxr / 00014_game Movie.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  22.2 KB  |  499 lines

  1. global gFlagRotation, gGameCountries, gFlag, gCountY, gCountX, gRemove, gCount, gNumSelected, gSelectNum1X, gSelectNum1Y, gSelectNum2X, gSelectNum2Y, gSelectNum3X, gSelectNum3Y, gScore, gLevel, pAdd, gTimeLoop, gPaused
  2.  
  3. on startMovie
  4.   repeat with gRemove = 25 to 28
  5.     sprite(gRemove).ink = 4
  6.   end repeat
  7.   repeat with gRemove = 36 to 91
  8.     sprite(gRemove).visible = 0
  9.   end repeat
  10.   sprite(3).rewind()
  11.   sprite(3).resume()
  12.   gTimeLoop = 0
  13.   gNumSelected = 0
  14.   gScore = 0
  15.   member("score_text").text = string(gScore)
  16.   gLevel = 1
  17.   member("level_text").text = string(gLevel)
  18.   gGameCountries = [[1, 2, 3, 4], [5, 6, 1, 2], [3, 4, 5, 6], [1, 2, 4, 6]]
  19.   gFlagRotation = [[0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3]]
  20.   repeat with gCountY = 0 to 3
  21.     repeat with gCountX = 0 to 3
  22.       if gLevel = 1 then
  23.         gFlag = random(6)
  24.         case gFlag of
  25.           1:
  26.             sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  27.           2:
  28.             sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  29.           3:
  30.             sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  31.           4:
  32.             sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  33.           5:
  34.             sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  35.           6:
  36.             sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  37.         end case
  38.       else
  39.         if gLevel = 2 then
  40.           gFlag = random(9)
  41.           case gFlag of
  42.             1:
  43.               sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  44.             2:
  45.               sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  46.             3:
  47.               sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  48.             4:
  49.               sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  50.             5:
  51.               sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  52.             6:
  53.               sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  54.             7:
  55.               sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  56.             8:
  57.               sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  58.             9:
  59.               sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  60.           end case
  61.         else
  62.           if gLevel = 3 then
  63.             gFlag = random(12)
  64.             case gFlag of
  65.               1:
  66.                 sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  67.               2:
  68.                 sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  69.               3:
  70.                 sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  71.               4:
  72.                 sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  73.               5:
  74.                 sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  75.               6:
  76.                 sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  77.               7:
  78.                 sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  79.               8:
  80.                 sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  81.               9:
  82.                 sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  83.               10:
  84.                 sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation"
  85.               11:
  86.                 sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation"
  87.               12:
  88.                 sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation"
  89.             end case
  90.           end if
  91.         end if
  92.       end if
  93.       gGameCountries[gCountY + 1][gCountX + 1] = gFlag
  94.       gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1
  95.       sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90
  96.       sprite(5 + gCountX + (gCountY * 4)).visible = 1
  97.       sprite(5 + gCountX + (gCountY * 4)).loc = point(194 + (gCountX * 109), 59 + (gCountY * 107))
  98.     end repeat
  99.   end repeat
  100.   startTimer()
  101. end
  102.  
  103. on checkCombination
  104.   if gNumSelected >= 3 then
  105.     if (gGameCountries[gSelectNum1Y][gSelectNum1X] = gGameCountries[gSelectNum2Y][gSelectNum2X]) and (gGameCountries[gSelectNum1Y][gSelectNum1X] = gGameCountries[gSelectNum3Y][gSelectNum3X]) then
  106.       gTimeLoop = the timer
  107.       repeat while the timer < (gTimeLoop + 30)
  108.         updateStage()
  109.       end repeat
  110.       puppetSound(1, "winSound")
  111.       repeat with gRemove = 39 to 91
  112.         sprite(gRemove).visible = 0
  113.       end repeat
  114.       repeat with gCountY = 0 to 3
  115.         repeat with gCountX = 0 to 3
  116.           if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then
  117.             sprite(5 + gCountX + (gCountY * 4)).visible = 0
  118.             sprite(80 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 50
  119.             sprite(80 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 12
  120.             sprite(80 + pAdd).visible = 1
  121.             sprite(81 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 52
  122.             sprite(81 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 14
  123.             sprite(81 + pAdd).visible = 1
  124.             pAdd = pAdd + 2
  125.           end if
  126.         end repeat
  127.       end repeat
  128.       pAdd = 0
  129.       gTimeLoop = the timer
  130.       repeat while the timer < (gTimeLoop + 30)
  131.         updateStage()
  132.       end repeat
  133.       repeat with gCountY = 0 to 3
  134.         repeat with gCountX = 0 to 3
  135.           gFlag = random(6)
  136.           if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then
  137.             if gLevel = 1 then
  138.               gFlag = random(6)
  139.               case gFlag of
  140.                 1:
  141.                   sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  142.                 2:
  143.                   sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  144.                 3:
  145.                   sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  146.                 4:
  147.                   sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  148.                 5:
  149.                   sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  150.                 6:
  151.                   sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  152.               end case
  153.             else
  154.               if gLevel = 2 then
  155.                 gFlag = random(9)
  156.                 case gFlag of
  157.                   1:
  158.                     sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  159.                   2:
  160.                     sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  161.                   3:
  162.                     sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  163.                   4:
  164.                     sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  165.                   5:
  166.                     sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  167.                   6:
  168.                     sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  169.                   7:
  170.                     sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  171.                   8:
  172.                     sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  173.                   9:
  174.                     sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  175.                 end case
  176.               else
  177.                 if gLevel = 3 then
  178.                   gFlag = random(12)
  179.                   case gFlag of
  180.                     1:
  181.                       sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  182.                     2:
  183.                       sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  184.                     3:
  185.                       sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  186.                     4:
  187.                       sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  188.                     5:
  189.                       sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  190.                     6:
  191.                       sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  192.                     7:
  193.                       sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  194.                     8:
  195.                       sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  196.                     9:
  197.                       sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  198.                     10:
  199.                       sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation"
  200.                     11:
  201.                       sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation"
  202.                     12:
  203.                       sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation"
  204.                   end case
  205.                 end if
  206.               end if
  207.             end if
  208.             gGameCountries[gCountY + 1][gCountX + 1] = gFlag
  209.             gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1
  210.             sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90
  211.             sprite(5 + gCountX + (gCountY * 4)).visible = 1
  212.           end if
  213.         end repeat
  214.       end repeat
  215.       gScore = gScore + 150
  216.       member("score_text").text = string(gScore)
  217.       repeat with gCount = 5 to 20
  218.         sprite(gCount).pCurrentlySelected = 0
  219.       end repeat
  220.       repeat with gRemove = 52 to 91
  221.         sprite(gRemove).visible = 0
  222.       end repeat
  223.       gNumSelected = 0
  224.     else
  225.       if (gGameCountries[gSelectNum1Y][gSelectNum1X] <= 3) and (gGameCountries[gSelectNum2Y][gSelectNum2X] <= 3) and (gGameCountries[gSelectNum3Y][gSelectNum3X] <= 3) and ((gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum2Y][gSelectNum2X]) and (gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum3Y][gSelectNum3X])) then
  226.         startTimer()
  227.         updateStage()
  228.         repeat while the timer < 30
  229.         end repeat
  230.         puppetSound(1, "winSound")
  231.         repeat with gRemove = 39 to 91
  232.           sprite(gRemove).visible = 0
  233.         end repeat
  234.         repeat with gCountY = 0 to 3
  235.           repeat with gCountX = 0 to 3
  236.             if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then
  237.               sprite(5 + gCountX + (gCountY * 4)).visible = 0
  238.               sprite(86 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 44
  239.               sprite(86 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 10
  240.               sprite(86 + pAdd).visible = 1
  241.               sprite(87 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 46
  242.               sprite(87 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 12
  243.               sprite(87 + pAdd).visible = 1
  244.               pAdd = pAdd + 2
  245.             end if
  246.           end repeat
  247.         end repeat
  248.         pAdd = 0
  249.         startTimer()
  250.         updateStage()
  251.         repeat while the timer < 30
  252.         end repeat
  253.         repeat with gCountY = 0 to 3
  254.           repeat with gCountX = 0 to 3
  255.             gFlag = random(6)
  256.             if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then
  257.               if gLevel = 1 then
  258.                 gFlag = random(6)
  259.                 case gFlag of
  260.                   1:
  261.                     sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  262.                   2:
  263.                     sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  264.                   3:
  265.                     sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  266.                   4:
  267.                     sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  268.                   5:
  269.                     sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  270.                   6:
  271.                     sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  272.                 end case
  273.               else
  274.                 if gLevel = 2 then
  275.                   gFlag = random(9)
  276.                   case gFlag of
  277.                     1:
  278.                       sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  279.                     2:
  280.                       sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  281.                     3:
  282.                       sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  283.                     4:
  284.                       sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  285.                     5:
  286.                       sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  287.                     6:
  288.                       sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  289.                     7:
  290.                       sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  291.                     8:
  292.                       sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  293.                     9:
  294.                       sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  295.                   end case
  296.                 else
  297.                   if gLevel = 3 then
  298.                     gFlag = random(12)
  299.                     case gFlag of
  300.                       1:
  301.                         sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  302.                       2:
  303.                         sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  304.                       3:
  305.                         sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  306.                       4:
  307.                         sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  308.                       5:
  309.                         sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  310.                       6:
  311.                         sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  312.                       7:
  313.                         sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  314.                       8:
  315.                         sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  316.                       9:
  317.                         sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  318.                       10:
  319.                         sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation"
  320.                       11:
  321.                         sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation"
  322.                       12:
  323.                         sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation"
  324.                     end case
  325.                   end if
  326.                 end if
  327.               end if
  328.               gGameCountries[gCountY + 1][gCountX + 1] = gFlag
  329.               gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1
  330.               sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90
  331.               sprite(5 + gCountX + (gCountY * 4)).visible = 1
  332.             end if
  333.           end repeat
  334.         end repeat
  335.         gScore = gScore + 300
  336.         member("score_text").text = string(gScore)
  337.         repeat with gCount = 5 to 20
  338.           sprite(gCount).pCurrentlySelected = 0
  339.         end repeat
  340.         repeat with gRemove = 52 to 91
  341.           sprite(gRemove).visible = 0
  342.         end repeat
  343.         sprite(3).rewind()
  344.         gNumSelected = 0
  345.         startTimer()
  346.       else
  347.         if (gGameCountries[gSelectNum1Y][gSelectNum1X] > 3) and (gGameCountries[gSelectNum2Y][gSelectNum2X] > 3) and (gGameCountries[gSelectNum3Y][gSelectNum3X] > 3) and ((gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum2Y][gSelectNum2X]) and (gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum3Y][gSelectNum3X])) then
  348.           startTimer()
  349.           updateStage()
  350.           repeat while the timer < 30
  351.           end repeat
  352.           puppetSound(1, "winSound")
  353.           repeat with gRemove = 39 to 91
  354.             sprite(gRemove).visible = 0
  355.           end repeat
  356.           repeat with gCountY = 0 to 3
  357.             repeat with gCountX = 0 to 3
  358.               if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then
  359.                 sprite(5 + gCountX + (gCountY * 4)).visible = 0
  360.                 sprite(86 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 44
  361.                 sprite(86 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 10
  362.                 sprite(86 + pAdd).visible = 1
  363.                 sprite(87 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 46
  364.                 sprite(87 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 12
  365.                 sprite(87 + pAdd).visible = 1
  366.                 pAdd = pAdd + 2
  367.               end if
  368.             end repeat
  369.           end repeat
  370.           pAdd = 0
  371.           startTimer()
  372.           updateStage()
  373.           repeat while the timer < 30
  374.           end repeat
  375.           repeat with gCountY = 0 to 3
  376.             repeat with gCountX = 0 to 3
  377.               gFlag = random(6)
  378.               if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then
  379.                 if gLevel = 1 then
  380.                   gFlag = random(6)
  381.                   case gFlag of
  382.                     1:
  383.                       sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  384.                     2:
  385.                       sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  386.                     3:
  387.                       sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  388.                     4:
  389.                       sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  390.                     5:
  391.                       sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  392.                     6:
  393.                       sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  394.                   end case
  395.                 else
  396.                   if gLevel = 2 then
  397.                     gFlag = random(9)
  398.                     case gFlag of
  399.                       1:
  400.                         sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  401.                       2:
  402.                         sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  403.                       3:
  404.                         sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  405.                       4:
  406.                         sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  407.                       5:
  408.                         sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  409.                       6:
  410.                         sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  411.                       7:
  412.                         sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  413.                       8:
  414.                         sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  415.                       9:
  416.                         sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  417.                     end case
  418.                   else
  419.                     if gLevel = 3 then
  420.                       gFlag = random(12)
  421.                       case gFlag of
  422.                         1:
  423.                           sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation"
  424.                         2:
  425.                           sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation"
  426.                         3:
  427.                           sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation"
  428.                         4:
  429.                           sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation"
  430.                         5:
  431.                           sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation"
  432.                         6:
  433.                           sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation"
  434.                         7:
  435.                           sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation"
  436.                         8:
  437.                           sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation"
  438.                         9:
  439.                           sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation"
  440.                         10:
  441.                           sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation"
  442.                         11:
  443.                           sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation"
  444.                         12:
  445.                           sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation"
  446.                       end case
  447.                     end if
  448.                   end if
  449.                 end if
  450.                 gGameCountries[gCountY + 1][gCountX + 1] = gFlag
  451.                 gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1
  452.                 sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90
  453.                 sprite(5 + gCountX + (gCountY * 4)).visible = 1
  454.               end if
  455.             end repeat
  456.           end repeat
  457.           gScore = gScore + 300
  458.           member("score_text").text = string(gScore)
  459.           repeat with gCount = 5 to 20
  460.             sprite(gCount).pCurrentlySelected = 0
  461.           end repeat
  462.           repeat with gRemove = 52 to 91
  463.             sprite(gRemove).visible = 0
  464.           end repeat
  465.           sprite(3).rewind()
  466.           gNumSelected = 0
  467.           startTimer()
  468.         else
  469.           gTimeLoop = the timer
  470.           repeat while the timer < (gTimeLoop + 30)
  471.             updateStage()
  472.           end repeat
  473.           puppetSound(1, "resetSound")
  474.           repeat with gRemove = 39 to 91
  475.             sprite(gRemove).visible = 0
  476.           end repeat
  477.           repeat with gCount = 5 to 20
  478.             sprite(gCount).pCurrentlySelected = 0
  479.           end repeat
  480.           gNumSelected = 0
  481.         end if
  482.       end if
  483.     end if
  484.     if gScore > (((gLevel - 1) * 1000) + (1500 * gLevel)) then
  485.       gPaused = 1
  486.       member("LevelComplete_Score").text = "Level" && string(gLevel) && "Score:" & RETURN & RETURN & string(gScore)
  487.       sprite(3).rewind()
  488.       sprite(3).pause()
  489.       gLevel = gLevel + 1
  490.       if gLevel <= 3 then
  491.         go(5)
  492.       else
  493.         member("GameOverSpeech").text = "You Win!!!"
  494.         go(12)
  495.       end if
  496.     end if
  497.   end if
  498. end
  499.